home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Math / trigHype™ / card_4467.txt < prev    next >
Encoding:
Text File  |  1991-03-17  |  4.1 KB  |  209 lines

  1. -- card: 4467 from stack: in
  2. -- bmap block id: 5154
  3. -- flags: 4000
  4. -- background id: 4114
  5. -- name: a,b known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   --Calculate Hypotenuse
  9.   set numberFormat to <0.000000>
  10.   put card field "side a"^2 into mem1
  11.   add card field "side b"^2 to mem1
  12.   put sqrt(mem1) into card field "side c"
  13.  
  14.   --Calculate Tan A
  15.   get card field "side a"
  16.   put it into mem3
  17.   get card field "side b"
  18.   put it into mem4
  19.   get mem3/mem4
  20.   put it into mem5
  21.   put it into card field "tan A"
  22.  
  23.   --Calculate Sin A
  24.   get card field "side a"
  25.   put it into mem6
  26.   get card field "side c"
  27.   put it into mem7
  28.   get mem6/mem7
  29.   put it into mem8
  30.   put it into card field "sin A"
  31.  
  32.   --Calculate Cos A
  33.   get mem8/mem5
  34.   put it into mem9
  35.   put it into card field "cos A"
  36.  
  37.   --Calculate Angle A
  38.   get atan((card field "side a")/(card field "side b"))*(180/pi)
  39.   put it into card field "angle A"
  40.  
  41.   --Calculate Angle B
  42.   get bkgnd field "angle C"-card field "angle A"
  43.   put it into card field "angle B"
  44.  
  45.   --Calculate Area
  46.   get card field "side a"*card field "side b"/2
  47.   put it into bkgnd field "Area"
  48.  
  49.   --Calculate Perimeter
  50.   get card field "side a"+card field "side b"+card field "side c"
  51.   put it into bkgnd field "Perimeter"
  52. end mouseUp
  53.  
  54.  
  55. -- part 2 (field)
  56. -- low flags: 00
  57. -- high flags: 0002
  58. -- rect: left=347 top=146 right=163 bottom=475
  59. -- title width / last selected line: 0
  60. -- icon id / first selected line: 0 / 0
  61. -- text alignment: 1
  62. -- font id: 3
  63. -- text size: 12
  64. -- style flags: 0
  65. -- line height: 16
  66. -- part name: side a
  67.  
  68.  
  69. -- part 3 (field)
  70. -- low flags: 00
  71. -- high flags: 0002
  72. -- rect: left=112 top=263 right=280 bottom=240
  73. -- title width / last selected line: 0
  74. -- icon id / first selected line: 0 / 0
  75. -- text alignment: 1
  76. -- font id: 3
  77. -- text size: 12
  78. -- style flags: 0
  79. -- line height: 16
  80. -- part name: side b
  81.  
  82.  
  83. -- part 4 (field)
  84. -- low flags: 01
  85. -- high flags: 0004
  86. -- rect: left=51 top=135 right=154 bottom=184
  87. -- title width / last selected line: 0
  88. -- icon id / first selected line: 0 / 0
  89. -- text alignment: 1
  90. -- font id: 3
  91. -- text size: 12
  92. -- style flags: 256
  93. -- line height: 16
  94. -- part name: side c
  95.  
  96.  
  97. -- part 6 (field)
  98. -- low flags: 01
  99. -- high flags: 0004
  100. -- rect: left=245 top=85 right=104 bottom=373
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 1
  104. -- font id: 3
  105. -- text size: 12
  106. -- style flags: 256
  107. -- line height: 16
  108. -- part name: angle B
  109.  
  110.  
  111. -- part 7 (field)
  112. -- low flags: 01
  113. -- high flags: 0004
  114. -- rect: left=22 top=215 right=234 bottom=150
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 1
  118. -- font id: 3
  119. -- text size: 12
  120. -- style flags: 256
  121. -- line height: 16
  122. -- part name: angle A
  123.  
  124.  
  125. -- part 9 (field)
  126. -- low flags: 01
  127. -- high flags: 0001
  128. -- rect: left=387 top=208 right=220 bottom=447
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 0 / 0
  131. -- text alignment: 0
  132. -- font id: 3
  133. -- text size: 9
  134. -- style flags: 0
  135. -- line height: 12
  136. -- part name: tan A
  137.  
  138.  
  139. -- part 10 (field)
  140. -- low flags: 01
  141. -- high flags: 0001
  142. -- rect: left=387 top=224 right=236 bottom=447
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 0 / 0
  145. -- text alignment: 0
  146. -- font id: 3
  147. -- text size: 9
  148. -- style flags: 0
  149. -- line height: 12
  150. -- part name: sin A
  151.  
  152.  
  153. -- part 11 (field)
  154. -- low flags: 01
  155. -- high flags: 0001
  156. -- rect: left=387 top=240 right=252 bottom=447
  157. -- title width / last selected line: 0
  158. -- icon id / first selected line: 0 / 0
  159. -- text alignment: 0
  160. -- font id: 3
  161. -- text size: 9
  162. -- style flags: 0
  163. -- line height: 12
  164. -- part name: cos A
  165.  
  166.  
  167. -- part contents for card part 2
  168. ----- text -----
  169. 1
  170.  
  171. -- part contents for card part 3
  172. ----- text -----
  173. 1
  174.  
  175. -- part contents for card part 4
  176. ----- text -----
  177. 1.414214
  178.  
  179. -- part contents for card part 7
  180. ----- text -----
  181. 45.000000
  182.  
  183. -- part contents for card part 9
  184. ----- text -----
  185. 1.000000
  186.  
  187. -- part contents for card part 10
  188. ----- text -----
  189. 0.707107
  190.  
  191. -- part contents for card part 11
  192. ----- text -----
  193. 0.707107
  194.  
  195. -- part contents for card part 6
  196. ----- text -----
  197. 45.000000
  198.  
  199. -- part contents for background part 3
  200. ----- text -----
  201. 90
  202.  
  203. -- part contents for background part 5
  204. ----- text -----
  205. 0.500000
  206.  
  207. -- part contents for background part 9
  208. ----- text -----
  209. 3.414214